<?xml version='1.0' encoding='UTF-8'?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:a="http://java.sun.com/jsf/composite/custom"
	template="../templates/template.xhtml">
		
	<ui:define name="pageTitle">#{msg.dclDetailsTitle}</ui:define>
	<ui:param name="req" value="#{requestDetailsPage.clientRequest}" />

	<ui:define name="content">
		<p>#{msg.dclDetailsPresentation}</p>
		
		<div class="contenu-item">
			<fieldset>
				<h:panelGrid columns="2" columnClasses="txtGras, ">
					<h:outputText value="#{msg.dclRechercheNo}" />
					#{req.clientReference}

					<h:outputText value="#{msg.dclRechercheTypeDC}" />
					#{req.requestType}
	
					<h:outputText value="#{msg.dclDetailsStatutEnCours}" />
					#{req.clientStatus}
	
					<h:outputText value="#{msg.dclDetailsVersionDemandee}" />
					#{req.deliveryVersion}
	
					<h:outputText value="#{msg.dclRechercheObjet}" />
					<h:inputTextarea value="#{req.title}"
						disabled="true" rows="3" cols="25" styleClass="textField"/>
	
					<h:outputText value="#{msg.dclRechercheProjet}" />
					<h:selectOneMenu value="#{req.project}" converter="projectConverter">
						<f:selectItem itemLabel=" - " itemValue="null" />
						<f:selectItems value="#{app.allProjects}" var="proj" itemLabel="#{proj.name}" itemValue="#{proj}" />
					</h:selectOneMenu>
					
					<h:outputText value="#{msg.dclDetailsChangerStatut}"
						      rendered="#{requestDetailsPage.renderStatus}" />
				</h:panelGrid>
			
			</fieldset>
		</div>

		<div class="contenu-item">
		    <p:panel header="#{msg.dclDetailsDescription}" toggleable="true" collapsed="true" toggleSpeed="0">
				<h:inputTextarea value="#{req.description}" disabled="true" cols="45" rows="20" styleClass="textField" />
		    </p:panel>

		    <p:panel header="#{msg.dclDetailsChiffrage}" toggleable="true" collapsed="true" toggleSpeed="0">
				<h:panelGrid columns="2" columnClasses="txtGras, ">
				    <h:outputText value="#{msg.dclDetailsChargeDC}" />
				    Charge
	
				    <h:outputText value="#{msg.dclDetailsChargeEstim}" />
				    Estimation
	
				    <h:outputText value="#{msg.dclRechercheConso}" />
				    Conso
	
				    <h:outputText value="#{msg.dclRechercheRAF}" />
				    RAF
				</h:panelGrid>
		    </p:panel>

		    <p:panel header="#{msg.dclDetailsHistoTitle}" toggleable="true" collapsed="true" toggleSpeed="0">
				Historique
		    </p:panel>

		    <p:panel header="#{msg.dclDetailsCommentaireArbitrage}" toggleable="true" collapsed="true" toggleSpeed="0">
				<h:inputTextarea value="#{req.evaluationComment}" disabled="true" cols="45" rows="20" styleClass="textField" />
		    </p:panel>

		    <p:panel header="#{msg.dclDetailsCommentaireRealisation}" toggleable="true" collapsed="true" toggleSpeed="0">
				<h:inputTextarea value="#{req.realisationComment}" disabled="true" cols="45" rows="20" styleClass="textField" />
		    </p:panel>

		    <p:panel header="#{msg.dclDetailsHistoriquePJ}" toggleable="true" collapsed="true" toggleSpeed="0">
				<h:inputTextarea value="#{req.attachmentHistory}" disabled="true" cols="45" rows="20" styleClass="textField" />
		    </p:panel>
		</div>
		
	</ui:define>
	
</ui:composition>